import pygame
from constants import Constants
from game_engine import Game_engine
from menu import Menu
class Run_engine():
    def __init__(self):
        pygame.init()
        self.screen = pygame.display.set_mode((Constants.HEIGHT,Constants.WITH))
        pygame.display.set_caption("Arkanoid Reload")
        self.choise_option = Constants.MENU_GAME
    
    def run_game(self):
        game = Game_engine(self.screen)
        game.run_game()
        self.choise_option = game.option
    
    def menu(self):
        menu = Menu(self.screen)
        menu.load_images_menu()
        menu.run_menu()
        self.choise_option = menu.option
        
    def main(self):
        while True:
            if self.choise_option == Constants.MENU_GAME:
                self.menu()
            if self.choise_option == Constants.START_GAME:
                self.run_game()
            if self.choise_option == Constants.EXIT_GAME:
                break